<template>
	<view class="enterprise-detail-page">
		<!-- 企业头部信息 -->
		<view class="company-header">
			<view class="company-logo">
				<image v-if="companyInfo[0]?.logoUrl && !showLogoPlaceholder" class="logo-image"
					:src="companyInfo[0]?.logoUrl" mode="aspectFit" @error="handleImageError"></image>
				<view v-else class="logo-placeholder">
					<text class="logo-text">{{ getCompanyNameFirstChar() }}</text>
				</view>
			</view>
			<view class="company-info">
				<text class="company-name">{{ companyInfo[0]?.companyName }}</text>
				<view class="company-tags">
					<view class="tag-item status-tag" v-if="companyInfo[0]?.status">
						<text class="tag-text">{{ companyInfo[0]?.status }}</text>
					</view>
					<view class="tag-item status-tag" v-if="companyInfo[0]?.enterpriseScale">
						<text class="tag-text">{{ companyInfo[0]?.enterpriseScale }}</text>
					</view>
					<view class="tag-item status-tag" v-if="companyInfo[0]?.nature">
						<text class="tag-text">{{ companyInfo[0]?.nature }}</text>
					</view>
					<view class="tag-item status-tag" v-if="hasFormerName" @click="showFormerNamePopup">
						<text class="tag-text">曾用名</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 关键指标卡片 -->
		<view class="metrics-section">
			<view class="metric-card credit-card">
				<view class="metric-value">98%</view>
				<text class="metric-label">企业信用分</text>
			</view>
			<view class="metric-card value-card">
				<view class="metric-value">76%</view>
				<text class="metric-label">商业价值分</text>
			</view>
			<view class="metric-card investment-card">
				<view class="metric-value">28%</view>
				<text class="metric-label">投融资指数</text>
			</view>
		</view>

		<!-- 基本信息容器 -->
		<view class="basic-info-container">
			<view class="info-item">
				<text class="info-title">法定代表人</text>
				<text class="info-content">{{ companyInfo[0]?.operName }}</text>
			</view>
			<view class="divider"></view>
			<view class="info-item">
				<text class="info-title">注册资本</text>
				<text class="info-content">{{ companyInfo[0]?.registCapi }}</text>
			</view>
			<view class="divider"></view>
			<view class="info-item">
				<text class="info-title">成立时间</text>
				<text class="info-content">{{ companyInfo[0]?.startDate }}</text>
			</view>
		</view>

		<!-- 企业简介 -->
		<view class="enterprise-intro" v-if="hasIntroContent">
			<view class="intro-item" v-for="(item, index) in filteredIntroItems" :key="index">
				<view class="intro-header" @click="toggleExpand(index)">
					<text class="intro-title">{{ item.title }}</text>
					<image class="intro-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
					<text class="intro-content" :class="{ 'expanded': item.expanded }">{{ item.content }}</text>
					<view class="intro-arrow" :class="{ 'rotated': item.expanded }"></view>
				</view>
			</view>
		</view>

		<!-- 简介 -->
		<view class="enterprise">
			<!-- 标题区域 -->
			<view class="enterprise-header">
				<text class="enterprise-title">企业简介</text>
				<image class="enterprise-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
			</view>

			<!-- 内容区域 -->
			<view class="enterprise-content">
				<text class="enterprise-text" :class="{ 'expanded': showFullContent }">{{ introduction }}</text>
				<text class="more-btn" @click="toggleContent">{{ showFullContent ? '收起' : '更多>' }}</text>
			</view>
		</view>

		<!-- 触达方式 -->
		<view class="reach-way">
			<!-- 标题区域 -->
			<view class="reach-way-header">
				<text class="reach-way-title">触达方式</text>
				<image class="reach-way-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
			</view>

			<!-- 内容区域 -->
			<view class="reach-way-content">
				<view class="reach-item" v-for="(item, index) in reachItems" :key="index">
					<text class="reach-title">{{ item.title }}</text>
					<text class="reach-content">{{ item.content }}</text>
					<view class="reach-tag" @click="showReachPopup(item.type, item.title)">
						<text class="tag-text">{{ item.tag }}</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 参股人 -->
		<view class="shareholder">
			<!-- 上半部分 - 股东信息 -->
			<view class="shareholder-top">
				<!-- 左侧股东卡片 -->
				<view class="shareholder-card">
					<text class="shareholder-title">股东{{ gudongInfo.length }}</text>
				</view>

				<!-- 右侧股东详情 -->
				<view class="shareholder-details-container">
					<view class="shareholder-detail" v-for="(item, index) in gudongInfo" :key="index">
						<!-- 上部分 -->
						<view class="detail-top">
							<view class="detail-avatar">
								<text class="avatar-text">{{ item.stockName ? item.stockName.charAt(0) : '股' }}</text>
							</view>
							<text class="detail-name">{{ item.stockName }}</text>
						</view>

						<!-- 下部分 -->
						<view class="detail-bottom">
							<text class="detail-content">{{ item.stockType }}</text>
						</view>
					</view>
				</view>
			</view>

			<!-- 下半部分 - 高管信息 -->
			<view class="shareholder-bottom">
				<!-- 高管卡片 -->
				<view class="executive-card">
					<view class="executive-avatar">
						<text class="executive-title">高管{{ executiveInfo.length }}</text>
					</view>
					<view class="executive-details-container">
						<view class="executive-detail" v-for="(item, index) in executiveInfo" :key="index">
							<view class="executive-info">
								<view class="executive-avatar-small">
									<text class="avatar-text-small">{{ item.name ? item.name.charAt(0) : '高' }}</text>
								</view>
								<view class="executive-text">
									<text class="executive-name">{{ item.name }}</text>
									<text class="executive-position">{{ item.jobTitle }}</text>
								</view>
							</view>
						</view>
					</view>
				</view>


			</view>
		</view>

		<!-- 动态 -->
		<view class="dynamic-section">
			<text class="dynamic-title">动态</text>
			<view class="dynamic-divider"></view>
			<text class="dynamic-content" :class="{ 'expanded': showDynamicContent }">{{ dynamicContent }}</text>
			<view class="dynamic-actions" @click="toggleDynamicContent">
				<text class="expand-text">{{ showDynamicContent ? '收起' : '展开' }}</text>
				<view class="dynamic-arrow" :class="{ 'rotated': showDynamicContent }"></view>
			</view>
		</view>

		<!-- 股权结构 -->
		<view class="reach-way" style="margin-bottom: 25rpx;">
			<!-- 标题区域 -->
			<view class="reach-way-header">
				<text class="reach-way-title">股权结构图</text>
				<text class="reach-way-text">穿透各级股权结构</text>
			</view>

			<!-- 内容区域 -->
			<view class="reach-way-contents">
				<view class="reach-way-content-item" @click="toEquity">
					<view></view>
					<view class="content-tit">股权结构图</view>
				</view>
				<view class="reach-way-content-item">
					<view></view>
					<view class="content-tit">实控人穿透</view>
				</view>
				<view class="reach-way-content-item">
					<view></view>
					<view class="content-tit">企业关系图</view>
				</view>
			</view>
		</view>
		<!-- 导航区域 -->
		<zmxy-sticky-top>
			<view class="navigation-section">
				<scroll-view class="navigation-scroll" scroll-x="true" show-scrollbar="false">
					<view class="navigation-content">
						<view class="nav-item" v-for="(item, index) in navigationItems" :key="index"
							:class="{ 'active': activeNavIndex === index }" @click="switchNavigation(index)">
							<text class="nav-text">{{ item.title }}</text>
							<view class="nav-indicator" v-if="activeNavIndex === index"></view>
						</view>
					</view>
				</scroll-view>
			</view>
		</zmxy-sticky-top>
		<!-- 详细 -->
		<view class="detail-section">
			<!-- 基础信息 -->
			<view class="detail-category" id="basic-info">
				<view class="category-title">
					<text class="title-text">基础信息</text>
					<image class="title-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
				</view>
				<view class="category-items">
					<view class="detail-item" @click="goBasicInfo('工商信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(1, 'gsxx')" mode="aspectFit"></image>
						<text class="detail-title">工商信息</text>
						<view class="badge" v-if="recordNumbers.gsxx === 0">{{ recordNumbers.gsxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('高管信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(2, 'ggxx')" mode="aspectFit"></image>
						<text class="detail-title">高管信息</text>
						<view class="badge" v-if="recordNumbers.ggxx === 0">{{ recordNumbers.ggxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('股东信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(3, 'gdxx')" mode="aspectFit"></image>
						<text class="detail-title">股东信息</text>
						<view class="badge" v-if="recordNumbers.gdxx === 0">{{ recordNumbers.gdxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('年报信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(4, 'nbxx')" mode="aspectFit"></image>
						<text class="detail-title">年报信息</text>
						<view class="badge" v-if="recordNumbers.nbxx === 0">{{ recordNumbers.nbxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('变更信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(5, 'bgxx')" mode="aspectFit"></image>
						<text class="detail-title">变更信息</text>
						<view class="badge" v-if="recordNumbers.bgxx === 0">{{ recordNumbers.bgxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('对外投资', 0)">
						<image class="detail-icon" :src="getIconWithBadge(6, 'dwtz')" mode="aspectFit"></image>
						<text class="detail-title">对外投资</text>
						<view class="badge" v-if="recordNumbers.dwtz === 0">{{ recordNumbers.dwtz }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('分支机构', 0)">
						<image class="detail-icon" :src="getIconWithBadge(7, 'fzjg')" mode="aspectFit"></image>
						<text class="detail-title">分支机构</text>
						<view class="badge" v-if="recordNumbers.fzjg === 0">{{ recordNumbers.fzjg }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('疑似实控人', 0)">
						<image class="detail-icon" :src="getIconWithBadge(8, 'yskgr')" mode="aspectFit"></image>
						<text class="detail-title">疑似实控人</text>
						<view class="badge" v-if="recordNumbers.yskgr === 0">{{ recordNumbers.yskgr }}</view>
					</view>
				</view>
			</view>

			<!-- 司法风险 -->
			<view class="detail-category" id="legal-risk">
				<view class="category-title">
					<text class="title-text">司法涉诉</text>
					<image class="title-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
				</view>
				<view class="category-items">
					<view class="detail-item" @click="goBasicInfo('失信信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(9, 'sxxx')" mode="aspectFit"></image>
						<text class="detail-title">失信信息</text>
						<view class="badge" v-if="recordNumbers.sxxx === 0">{{ recordNumbers.sxxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('裁判文书', 0)">
						<image class="detail-icon" :src="getIconWithBadge(10, 'cpws')" mode="aspectFit"></image>
						<text class="detail-title">裁判文书</text>
						<view class="badge" v-if="recordNumbers.cpws === 0">{{ recordNumbers.cpws }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('开庭公告', 0)">
						<image class="detail-icon" :src="getIconWithBadge(11, 'ktgg')" mode="aspectFit"></image>
						<text class="detail-title">开庭公告</text>
						<view class="badge" v-if="recordNumbers.ktgg === 0">{{ recordNumbers.ktgg }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('立案信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(12, 'laxx')" mode="aspectFit"></image>
						<text class="detail-title">立案信息</text>
						<view class="badge" v-if="recordNumbers.laxx === 0">{{ recordNumbers.laxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('法院公告', 0)">
						<image class="detail-icon" :src="getIconWithBadge(13, 'fygg')" mode="aspectFit"></image>
						<text class="detail-title">法院公告</text>
						<view class="badge" v-if="recordNumbers.fygg === 0">{{ recordNumbers.fygg }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('执行信息', 0)">
						<image class="detail-icon" :src="getIconWithBadge(14, 'zxxx')" mode="aspectFit"></image>
						<text class="detail-title">执行信息</text>
						<view class="badge" v-if="recordNumbers.zxxx === 0">{{ recordNumbers.zxxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('股权冻结', 0)">
						<image class="detail-icon" :src="getIconWithBadge(15, 'gtdj')" mode="aspectFit"></image>
						<text class="detail-title">股权冻结</text>
						<view class="badge" v-if="recordNumbers.gtdj === 0">{{ recordNumbers.gtdj }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('限制消费令', 0)">
						<image class="detail-icon" :src="getIconWithBadge(16, 'xzxl')" mode="aspectFit"></image>
						<text class="detail-title">限制消费令</text>
						<view class="badge" v-if="recordNumbers.xzxl === 0">{{ recordNumbers.xzxl }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('终本案件', 0)">
						<image class="detail-icon" :src="getIconWithBadge(17, 'zbaj')" mode="aspectFit"></image>
						<text class="detail-title">终本案件</text>
						<view class="badge" v-if="recordNumbers.zbaj === 0">{{ recordNumbers.zbaj }}</view>
					</view>
				</view>
			</view>

			<!-- 经营风险 -->
			<view class="detail-category" id="business-risk">
				<view class="category-title">
					<text class="title-text">经营风险</text>
					<image class="title-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
				</view>
				<view class="category-items">
					<view class="detail-item" @click="goBasicInfo('经营异常', 1)">
						<image class="detail-icon" :src="getIconWithBadge(18, 'yyyc')" mode="aspectFit"></image>
						<text class="detail-title">经营异常</text>
						<view class="badge" v-if="recordNumbers.yyyc === 0">{{ recordNumbers.yyyc }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('行政处罚', 1)">
						<image class="detail-icon" :src="getIconWithBadge(19, 'xzcf')" mode="aspectFit"></image>
						<text class="detail-title">行政处罚</text>
						<view class="badge" v-if="recordNumbers.xzcf === 0">{{ recordNumbers.xzcf }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('环保处罚', 1)">
						<image class="detail-icon" :src="getIconWithBadge(20, 'hfcf')" mode="aspectFit"></image>
						<text class="detail-title">环保处罚</text>
						<view class="badge" v-if="recordNumbers.hfcf === 0">{{ recordNumbers.hfcf }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('严重违法', 1)">
						<image class="detail-icon" :src="getIconWithBadge(21, 'ywf')" mode="aspectFit"></image>
						<text class="detail-title">严重违法</text>
						<view class="badge" v-if="recordNumbers.ywf === 0">{{ recordNumbers.ywf }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('简易注销', 1)">
						<image class="detail-icon" :src="getIconWithBadge(22, 'jyzx')" mode="aspectFit"></image>
						<text class="detail-title">简易注销</text>
						<view class="badge" v-if="recordNumbers.jyzx === 0">{{ recordNumbers.jyzx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('欠税公告', 1)">
						<image class="detail-icon" :src="getIconWithBadge(23, 'qsgg')" mode="aspectFit"></image>
						<text class="detail-title">欠税公告</text>
						<view class="badge" v-if="recordNumbers.qsgg === 0">{{ recordNumbers.qsgg }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('司法拍卖', 1)">
						<image class="detail-icon" :src="getIconWithBadge(24, 'sfpm')" mode="aspectFit"></image>
						<text class="detail-title">司法拍卖</text>
						<view class="badge" v-if="recordNumbers.sfpm === 0">{{ recordNumbers.sfpm }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('股权出质', 1)">
						<image class="detail-icon" :src="getIconWithBadge(25, 'gtcz')" mode="aspectFit"></image>
						<text class="detail-title">股权出质</text>
						<view class="badge" v-if="recordNumbers.gtcz === 0">{{ recordNumbers.gtcz }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('知识产权出质', 1)">
						<image class="detail-icon" :src="getIconWithBadge(26, 'zscqcz')" mode="aspectFit"></image>
						<text class="detail-title">知识产权出质</text>
						<view class="badge" v-if="recordNumbers.zscqcz === 0">{{ recordNumbers.zscqcz }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('动产抵押', 1)">
						<image class="detail-icon" :src="getIconWithBadge(27, 'dcdy')" mode="aspectFit"></image>
						<text class="detail-title">动产抵押</text>
						<view class="badge" v-if="recordNumbers.dcdy === 0">{{ recordNumbers.dcdy }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('税收违法', 1)">
						<image class="detail-icon" :src="getIconWithBadge(28, 'sswf')" mode="aspectFit"></image>
						<text class="detail-title">税收违法</text>
						<view class="badge" v-if="recordNumbers.sswf === 0">{{ recordNumbers.sswf }}</view>
					</view>
				</view>
			</view>

			<!-- 经营信息 -->
			<view class="detail-category" id="business-info">
				<view class="category-title">
					<text class="title-text">经营信息</text>
					<image class="title-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
				</view>
				<view class="category-items">
					<view class="detail-item" @click="goBasicInfo('供应商', 2)">
						<image class="detail-icon" :src="getIconWithBadge(29, 'gys')" mode="aspectFit"></image>
						<text class="detail-title">供应商</text>
						<view class="badge" v-if="recordNumbers.gys === 0">{{ recordNumbers.gys }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('客户', 2)">
						<image class="detail-icon" :src="getIconWithBadge(30, 'kh')" mode="aspectFit"></image>
						<text class="detail-title">客户</text>
						<view class="badge" v-if="recordNumbers.kh === 0">{{ recordNumbers.kh }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('税务评级', 2)">
						<image class="detail-icon" :src="getIconWithBadge(31, 'swpj')" mode="aspectFit"></image>
						<text class="detail-title">税务评级</text>
						<view class="badge" v-if="recordNumbers.swpj === 0">{{ recordNumbers.swpj }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('招投标', 2)">
						<image class="detail-icon" :src="getIconWithBadge(32, 'ztb')" mode="aspectFit"></image>
						<text class="detail-title">招投标</text>
						<view class="badge" v-if="recordNumbers.ztb === 0">{{ recordNumbers.ztb }}</view>
					</view>
					<!--	<view class="detail-item">
					<image class="detail-icon" src="https://apizx01.sc798.com/Resource/detail/32.png" mode="aspectFit"></image>
					<text class="detail-title">购地信息</text>
				</view>
				<view class="detail-item">
					<image class="detail-icon" src="https://apizx01.sc798.com/Resource/detail/33.png" mode="aspectFit"></image>
					<text class="detail-title">招聘岗位</text>
				</view> -->

				</view>
			</view>

			<!-- 知识产权 -->
			<view class="detail-category" id="intellectual-property">
				<view class="category-title">
					<text class="title-text">知识产权</text>
					<image class="title-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
				</view>
				<view class="category-items">
					<view class="detail-item" @click="goBasicInfo('商标', 3)">
						<image class="detail-icon" :src="getIconWithBadge(33, 'sb')" mode="aspectFit"></image>
						<text class="detail-title">商标</text>
						<view class="badge" v-if="recordNumbers.sb === 0">{{ recordNumbers.sb }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('专利', 3)">
						<image class="detail-icon" :src="getIconWithBadge(34, 'zl')" mode="aspectFit"></image>
						<text class="detail-title">专利</text>
						<view class="badge" v-if="recordNumbers.zl === 0">{{ recordNumbers.zl }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('资质证书', 3)">
						<image class="detail-icon" :src="getIconWithBadge(35, 'zzzs')" mode="aspectFit"></image>
						<text class="detail-title">资质证书</text>
						<view class="badge" v-if="recordNumbers.zzzs === 0">{{ recordNumbers.zzzs }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('软件著作权', 3)">
						<image class="detail-icon" :src="getIconWithBadge(36, 'rjzzq')" mode="aspectFit"></image>
						<text class="detail-title">软件著作权</text>
						<view class="badge" v-if="recordNumbers.rjzzq === 0">{{ recordNumbers.rjzzq }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('网站备案', 3)">
						<image class="detail-icon" :src="getIconWithBadge(37, 'wzba')" mode="aspectFit"></image>
						<text class="detail-title">网站备案</text>
						<view class="badge" v-if="recordNumbers.wzba === 0">{{ recordNumbers.wzba }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('著作权', 3)">
						<image class="detail-icon" :src="getIconWithBadge(38, 'zzq')" mode="aspectFit"></image>
						<text class="detail-title">著作权</text>
						<view class="badge" v-if="recordNumbers.zzq === 0">{{ recordNumbers.zzq }}</view>
					</view>
				</view>
			</view>

			<!-- 发展历程 -->
			<view class="detail-category" id="development-history">
				<view class="category-title">
					<text class="title-text">发展历程</text>
					<image class="title-icon" src="https://apizx01.sc798.com/Resource/home/msg.png" mode="aspectFit"></image>
				</view>
				<view class="category-items">
					<view class="detail-item" @click="goBasicInfo('股权融资', 4)">
						<image class="detail-icon" :src="getIconWithBadge(39, 'rzjl')" mode="aspectFit"></image>
						<text class="detail-title">股权融资</text>
						<view class="badge" v-if="recordNumbers.rzjl === 0">{{ recordNumbers.rzjl }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('股票融资', 4)">
						<image class="detail-icon" :src="getIconWithBadge(40, 'cpxx')" mode="aspectFit"></image>
						<text class="detail-title">股票融资</text>
						<view class="badge" v-if="recordNumbers.cpxx === 0">{{ recordNumbers.cpxx }}</view>
					</view>
					<view class="detail-item" @click="goBasicInfo('债券融资', 4)">
						<image class="detail-icon" :src="getIconWithBadge(41, 'zqrz')" mode="aspectFit"></image>
						<text class="detail-title">债券融资</text>
						<view class="badge" v-if="recordNumbers.zqrz === 0">{{ recordNumbers.zqrz }}</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 固定底边栏 -->
		<view class="bottom-bar">
			<view class="bottom-content">
				<!-- 添加任务 -->
				<view class="bottom-item" @click="handleAddTask">
					<image class="bottom-icon" :src="getBottomIconPath(42, 'collection')" mode="aspectFit"></image>
					<text class="bottom-text ">收藏</text>
				</view>

				<!-- 跟进 -->
				<view class="bottom-item" @click="handleFollow">
					<image class="bottom-icon" :src="getBottomIconPath(43, 'monitor')" mode="aspectFit"></image>
					<text class="bottom-text">监控</text>
				</view>

				<!-- 监控 -->
				<view class="bottom-item" @click="handleMonitor">
					<image class="bottom-icon" :src="getBottomIconPath(44, 'checkup')" mode="aspectFit"></image>
					<text class="bottom-text">体检</text>
				</view>

				<!-- 更多 -->
				<view class="bottom-item" @click="handleMore">
					<image class="bottom-icon" :src="getBottomIconPath(45, 'similar')" mode="aspectFit"></image>
					<text class="bottom-text">找相似</text>
				</view>

				<!-- 反馈按钮 -->
				<view class="feedback-btn" @click="handleFeedback">
					<text class="feedback-text">信用报告</text>
				</view>
			</view>
		</view>

		<!-- 弹框组件 -->
		<view class="popup-overlay" v-if="showPopup" @click="closePopup">
			<view class="popup-content" @click.stop>
				<!-- 弹框标题栏 -->
				<view class="popup-header">
					<text class="popup-title">{{ popupTitle }}</text>
					<view class="popup-close" @click="closePopup">
						<text class="close-text">×</text>
					</view>
				</view>

				<!-- 弹框内容 -->
				<view class="popup-body">
					<view class="popup-item" v-for="(item, index) in popupData" :key="index">
						<view class="item-content">
							<text class="item-value">{{ item.value }}</text>
							<text class="item-name">{{ item.name }}</text>
						</view>
						<view class="copy-btn" @click="copyToClipboard(item.value)">
							<text class="copy-text">复制</text>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 曾用名弹窗 -->
		<view class="former-name-overlay" v-if="showFormerNameModal" @click="closeFormerNameModal">
			<view class="former-name-modal" @click.stop>
				<!-- 头部 -->
				<view class="former-name-header">
					<image class="header-bg" src="https://apizx01.sc798.com/Resource/details/cym.png" mode="aspectFill"></image>
					<view class="header-content">
						<text class="former-name-title">曾用名</text>
						<view class="former-name-close" @click="closeFormerNameModal">
							<image class="close-icon" src="https://apizx01.sc798.com/Resource/details/close.png" mode="aspectFit"></image>
							<text class="close-text-white">关闭</text>
						</view>
					</view>
				</view>

				<!-- 内容区域 -->
				<view class="former-name-body">
					<view class="former-name-item" v-for="(item, index) in formerNameList" :key="index">
						<text class="former-name-item-name">{{ item.formatName || item.historyName }}</text>
						<text class="former-name-item-date">{{ item.date || item.usedDate || '' }}</text>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script setup>
import { ref, onMounted, computed } from 'vue'
//跳转股权结构图
const toEquity = () =>{
	const params = {
		creditcode: receivedEnterprise.value.creditCode,
		companyname: receivedEnterprise.value.companyName
	}
	uni.navigateTo({
		url:`/pages/subpkg/Equity/index?params=${encodeURIComponent(JSON.stringify(params))}`,
	})
}
// 根据 badge 值获取图标路径
const getIconWithBadge = (iconNumber, badgeKey) => {
	if (!recordNumbers.value || !badgeKey) {
		return `https://apizx01.sc798.com/Resource/details/${iconNumber}.png`
	}

	const count = recordNumbers.value[badgeKey]

	// 如果 badge 为 0（无数据），则在图标号前面加 0
	if (count === 0) {
		return `https://apizx01.sc798.com/Resource/details/0${iconNumber}.png`
	}
	return `https://apizx01.sc798.com/Resource/details/${iconNumber}.png`
}

// 统一的跳转处理方法
const goBasicInfo = (title, type) => {
	// 定义标题到 recordNumbers key 的映射
	const titleToRecordKey = {
		// 基础信息
		'工商信息': 'gsxx',
		'高管信息': 'ggxx',
		'股东信息': 'gdxx',
		'年报信息': 'nbxx',
		'变更信息': 'bgxx',
		'对外投资': 'dwtz',
		'分支机构': 'fzjg',
		'疑似实控人': 'yskgr',
		// 司法涉诉
		'失信信息': 'sxxx',
		'裁判文书': 'cpws',
		'开庭公告': 'ktgg',
		'立案信息': 'laxx',
		'法院公告': 'fygg',
		'执行信息': 'zxxx',
		'股权冻结': 'gtdj',
		'限制消费令': 'xzxl',
		'终本案件': 'zbaj',
		// 经营风险
		'经营异常': 'yyyc',
		'行政处罚': 'xzcf',
		'环保处罚': 'hfcf',
		'严重违法': 'ywf',
		'简易注销': 'jyzx',
		'欠税公告': 'qsgg',
		'司法拍卖': 'sfpm',
		'股权出质': 'gtcz',
		'知识产权出质': 'zscqcz',
		'动产抵押': 'dcdy',
		'税收违法': 'sswf',
		// 经营信息
		'供应商': 'gys',
		'客户': 'kh',
		'税务评级': 'swpj',
		'招投标': 'ztb',
		// 知识产权
		'商标': 'sb',
		'专利': 'zl',
		'资质证书': 'zzzs',
		'软件著作权': 'rjzzq',
		'网站备案': 'wzba',
		'著作权': 'zzq',
	}

	// 获取对应的 record key
	const recordKey = titleToRecordKey[title]

	// 检查权限：如果 recordNumbers 为 0，则不跳转
	if (recordKey && recordNumbers.value[recordKey] === 0) {
		return
	}

	// type 0: 基础信息和司法涉诉
	if (type === 0) {
		// 基础信息
		if (title === '工商信息') {
			goToGsxx('工商信息')
		} else if (title === '高管信息') {
			goToGgxx()
		} else if (title === '股东信息') {
			goToGdxx()
		} else if (title === '年报信息') {
			goToNbxx()
		} else if (title === '变更信息') {
			goTo('bgxx')
		} else if (title === '对外投资') {
			goTo('dwtz')
		} else if (title === '分支机构') {
			goTo('fzjg')
		} else if (title === '疑似实控人') {
			goTo('yskgr')
		}
		// 司法涉诉 - 处理失信信息、裁判文书等
		else if (title === '失信信息' || title === '裁判文书' || title === '开庭公告' ||
			title === '立案信息' || title === '法院公告' || title === '执行信息' ||
			title === '股权冻结' || title === '限制消费令' || title === '终本案件') {
			goToLegalRisk(title)
		}
	} else {
		// type 1: 经营风险 type 2: 经营信息 3: 知识产权 4：融资信息
		if (title == '股票融资' || title == '债券融资') {
			uni.showToast({
				title: '敬请期待',
				icon: 'none'
			})
			return;
		}
		const params = {
			title,
			type,
			creditcode: receivedEnterprise.value.creditCode,
			companyname: receivedEnterprise.value.companyName
		}
		uni.navigateTo({
			url: `/pages/subpkg/BasicInfo/index?params=${encodeURIComponent(JSON.stringify(params))}`
		})
	}
}

// 响应式数据
const companyInfo = ref([])

// 企业简介数据
const introItems = ref([
	{
		title: '国标行业',
		content: '',
		expanded: false
	},
	{
		title: '战新产业',
		content: '',
		expanded: false
	}
])

// 动态更新企业简介内容
const updateIntroItems = () => {
	if (companyInfo.value.length > 0) {
		const company = companyInfo.value[0]
		console.log('企业数据字段:', Object.keys(company))
		console.log('industryNameNew:', company.industryNameNew)
		console.log('cyLabel:', company.cyLabel)

		// 更新国标行业
		introItems.value[0].content = company.industryNameNew || ''
		// 更新战新产业
		introItems.value[1].content = company.cyLabel || ''

		console.log('更新后的introItems:', introItems.value)
	}
}

// 过滤有内容的简介项
const filteredIntroItems = computed(() => {
	const filtered = introItems.value.filter(item => item.content && item.content.trim() !== '')
	console.log('原始introItems:', introItems.value)
	console.log('过滤后的introItems:', filtered)
	return filtered
})

// 判断是否有简介内容
const hasIntroContent = computed(() => {
	const hasContent = filteredIntroItems.value.length > 0
	console.log('是否有简介内容:', hasContent)
	return hasContent
})

// 方法
const goBack = () => {
	uni.navigateBack()
}

// 切换展开/折叠
const toggleExpand = (index) => {
	introItems.value[index].expanded = !introItems.value[index].expanded
}



// 企业简介展开状态
const showFullContent = ref(false)
const showMoreBtn = ref(true)

// 切换企业简介内容显示
const toggleContent = () => {
	showFullContent.value = !showFullContent.value
}

// 动态内容数据
const dynamicContent = ref('湖北宏泰集团有限公司于2024年完成新一轮融资，获得多家知名投资机构青睐，公司估值大幅提升。同时，公司在新兴技术领域取得重大突破，与多家高校建立产学研合作关系，推动技术创新和产业升级。')

// 动态内容展开状态
const showDynamicContent = ref(false)

// 切换动态内容显示
const toggleDynamicContent = () => {
	showDynamicContent.value = !showDynamicContent.value
}

// 跳转到司法风险详情页面
const goToLegalRisk = (title) => {
	// 获取当前企业信息
	const enterprise = receivedEnterprise.value

	// 根据标题设置对应的category值
	let category = '01'; // 默认设置为失信信息
	if (title === '裁判文书') {
		category = '03';
	} else if (title === '开庭公告') {
		category = '06'; // 修正为开庭公告对应的正确category值
	} else if (title === '立案信息') {
		category = '10'; // 立案信息对应的正确category值
	} else if (title === '法院公告') {
		category = '07'; // 法院公告对应的正确category值
	} else if (title === '执行信息') {
		category = '02'; // 执行信息对应的正确category值
	} else if (title === '终本案件') {
		category = '09'; // 终本案件对应的category值
	} else if (title === '限制消费令') {
		category = '04'; // 限制消费令对应的category值
	} else if (title === '股权冻结') {
		category = '08'; // 股权冻结对应的category值
	}

	uni.navigateTo({
		url: `/pages/legal-risk/legal-risk?title=${encodeURIComponent(title)}&creditcode=${enterprise.creditCode}&category=${category}`
	})
}

const goTo = (page) => {
	console.log('goTo', receivedEnterprise.value.creditCode)
	uni.navigateTo({
		url: `/pages/${page}/${page}?creditcode=${receivedEnterprise.value.creditCode}`
	})
}
// 跳转到工商信息详情页面
const goToGsxx = (title) => {
	// 获取当前企业信息
	const enterprise = receivedEnterprise.value
	if (!enterprise) {
		uni.showToast({
			title: '企业信息不存在',
			icon: 'none'
		})
		return
	}

	// 准备传递的数据
	const requestData = {
		category: '01',
		companyname: enterprise.companyName,
		creditcode: enterprise.creditCode,
		pageNum: 1,
		pageSize: 10,
		ishistorycode: ''
	}

	uni.navigateTo({
		url: `/pages/legal-risk/gsxx?title=${encodeURIComponent(title)}&requestData=${encodeURIComponent(JSON.stringify(requestData))}`
	})
}

// 跳转到高管信息页面
const goToGgxx = () => {
	console.log('点击高管信息，准备跳转')
	console.log('高管信息数据:', executiveInfo.value)

	if (executiveInfo.value.length === 0) {
		uni.showToast({
			title: '暂无高管信息',
			icon: 'none'
		})
		return
	}

	try {
		uni.navigateTo({
			url: `/pages/legal-risk/ggxx?executiveInfo=${encodeURIComponent(JSON.stringify(executiveInfo.value))}`,
			success: () => {
				console.log('跳转成功')
			},
			fail: (err) => {
				console.log('跳转失败:', err)
				uni.showToast({
					title: '页面跳转失败',
					icon: 'none'
				})
			}
		})
	} catch (error) {
		console.log('跳转异常:', error)
		uni.showToast({
			title: '跳转异常',
			icon: 'none'
		})
	}
}

// 跳转到股东信息页面
const goToGdxx = () => {
	console.log('点击股东信息，准备跳转')
	console.log('股东信息数据:', gudongInfo.value)

	if (gudongInfo.value.length === 0) {
		uni.showToast({
			title: '暂无股东信息',
			icon: 'none'
		})
		return
	}

	try {
		uni.navigateTo({
			url: `/pages/legal-risk/gdxx?gudongInfo=${encodeURIComponent(JSON.stringify(gudongInfo.value))}`,
			success: () => {
				console.log('跳转成功')
			},
			fail: (err) => {
				console.log('跳转失败:', err)
				uni.showToast({
					title: '页面跳转失败',
					icon: 'none'
				})
			}
		})
	} catch (error) {
		console.log('跳转异常:', error)
		uni.showToast({
			title: '跳转异常',
			icon: 'none'
		})
	}
}

// 跳转到年报信息页面
const goToNbxx = () => {
	console.log('点击年报信息，准备跳转')

	// 获取当前企业信息
	const enterprise = receivedEnterprise.value
	if (!enterprise) {
		uni.showToast({
			title: '企业信息不存在',
			icon: 'none'
		})
		return
	}

	// 准备传递的数据
	const requestData = {
		category: '05',
		companyname: enterprise.companyName,
		creditcode: enterprise.creditCode,
		pageNum: 1,
		pageSize: 10,
		ishistorycode: ''
	}

	try {
		uni.navigateTo({
			url: `/pages/legal-risk/nbxx?requestData=${encodeURIComponent(JSON.stringify(requestData))}`,
			success: () => {
				console.log('跳转成功')
			},
			fail: (err) => {
				console.log('跳转失败:', err)
				uni.showToast({
					title: '页面跳转失败',
					icon: 'none'
				})
			}
		})
	} catch (error) {
		console.log('跳转异常:', error)
		uni.showToast({
			title: '跳转异常',
			icon: 'none'
		})
	}
}

// 底边栏点击处理方法
const handleAddTask = () => {
	isBottomItemSelected.value.collection = !isBottomItemSelected.value.collection
	uni.showToast({
		title: '添加任务',
		icon: 'none'
	})
}

const handleFollow = () => {
	isBottomItemSelected.value.monitor = !isBottomItemSelected.value.monitor
	uni.showToast({
		title: '收藏',
		icon: 'none'
	})
}

const handleMonitor = () => {
	isBottomItemSelected.value.checkup = !isBottomItemSelected.value.checkup
	uni.showToast({
		title: '体检',
		icon: 'none'
	})
}

const handleMore = () => {
	isBottomItemSelected.value.similar = !isBottomItemSelected.value.similar
	uni.showToast({
		title: '找相似',
		icon: 'none'
	})
}

// 获取公司名称第一个字符
const getCompanyNameFirstChar = () => {
	const companyName = companyInfo.value[0]?.companyName
	if (!companyName) return '企'
	return companyName.charAt(0)
}

const handleFeedback = () => {
	uni.switchTab({ url: '/pages/report/report' })
}

// 显示触达方式弹框
const showReachPopup = (type, title) => {
	console.log('显示弹框:', type, title)

	let data = []
	let popupTitleText = ''

	switch (type) {
		case 'phone':
			if (contactMethods09.value.length > 0 && contactMethods09.value[0].telephones) {
				data = contactMethods09.value[0].telephones.map(item => ({
					value: item.value,
					name: item.name
				}))
				popupTitleText = `电话(${data.length})`
			}
			break
		case 'email':
			if (contactMethods09.value.length > 0 && contactMethods09.value[0].emails) {
				data = contactMethods09.value[0].emails.map(item => ({
					value: item.value,
					name: item.name
				}))
				popupTitleText = `邮箱(${data.length})`
			}
			break
		case 'website':
			if (contactMethods11.value.length > 0) {
				data = contactMethods11.value.map(item => ({
					value: item.webUrl,
					name: item.webName
				}))
				popupTitleText = `网站(${data.length})`
			}
			break
		case 'address':
			if (contactMethods09.value.length > 0 && contactMethods09.value[0].address) {
				data = contactMethods09.value[0].address.map(item => ({
					value: item.address,
					name: item.name
				}))
				popupTitleText = `地址(${data.length})`
			}
			break
	}

	if (data.length > 0) {
		popupTitle.value = popupTitleText
		popupData.value = data
		showPopup.value = true
	} else {
		uni.showToast({
			title: '暂无数据',
			icon: 'none'
		})
	}
}

// 关闭弹框
const closePopup = () => {
	showPopup.value = false
	popupTitle.value = ''
	popupData.value = []
}

// 复制到剪贴板
const copyToClipboard = (text) => {
	uni.setClipboardData({
		data: text,
		success: () => {
			uni.showToast({
				title: '复制成功',
				icon: 'success'
			})
		},
		fail: () => {
			uni.showToast({
				title: '复制失败',
				icon: 'none'
			})
		}
	})
}

// 切换导航
const switchNavigation = (index) => {
	activeNavIndex.value = index
	const targetId = navigationItems.value[index].id

	// 如果是最后一个导航项（发展历程），直接跳转到页面底部
	if (index === navigationItems.value.length - 1) {
		uni.createSelectorQuery().selectViewport().scrollOffset((scroll) => {
			// 获取页面总高度
			uni.createSelectorQuery().select('.enterprise-detail-page').boundingClientRect((rect) => {
				if (rect) {
					uni.pageScrollTo({
						scrollTop: rect.height,
						duration: 300
					})
				}
			}).exec()
		}).exec()
		return
	}

	// 其他导航项的正常跳转逻辑
	uni.createSelectorQuery().select(`#${targetId}`).boundingClientRect((rect) => {
		if (rect) {
			// 获取当前页面滚动位置
			uni.createSelectorQuery().selectViewport().scrollOffset((scroll) => {
				// 计算目标位置，减去导航栏和自定义导航栏的高度
				const targetScrollTop = scroll.scrollTop + rect.top - 300 // 调整偏移量
				uni.pageScrollTo({
					scrollTop: targetScrollTop,
					duration: 300
				})
			}).exec()
		}
	}).exec()
}

// 触达方式数据 - 改为计算属性
const reachItems = computed(() => {
	const items = []

	// 处理电话数据
	if (contactMethods09.value.length > 0 && contactMethods09.value[0].telephones) {
		const telephones = contactMethods09.value[0].telephones
		if (telephones.length > 0) {
			items.push({
				title: '电话：',
				content: telephones[0].value,
				tag: telephones.length.toString(),
				type: 'phone'
			})
		}
	}

	// 处理邮箱数据
	if (contactMethods09.value.length > 0 && contactMethods09.value[0].emails) {
		const emails = contactMethods09.value[0].emails
		if (emails.length > 0) {
			items.push({
				title: '邮箱：',
				content: emails[0].value,
				tag: emails.length.toString(),
				type: 'email'
			})
		}
	}

	// 处理网站数据
	if (contactMethods11.value.length > 0) {
		const websites = contactMethods11.value
		if (websites.length > 0) {
			items.push({
				title: '网站：',
				content: websites[0].webUrl,
				tag: websites.length.toString(),
				type: 'website'
			})
		}
	}

	// 处理地址数据
	if (contactMethods09.value.length > 0 && contactMethods09.value[0].address) {
		const addresses = contactMethods09.value[0].address
		if (addresses.length > 0) {
			items.push({
				title: '地址：',
				content: addresses[0].address,
				tag: addresses.length.toString(),
				type: 'address'
			})
		}
	}

	return items
})

// 接收的企业信息
const receivedEnterprise = ref(null)

// 控制是否显示 logo 占位符
const showLogoPlaceholder = ref(false)

// 图片加载错误处理
const handleImageError = (e) => {
	console.log('图片加载失败:', e)
	console.log('尝试加载的URL:', companyInfo.value[0]?.logoUrl)
	// 图片加载失败时显示占位符
	showLogoPlaceholder.value = true
}

const introduction = ref('')

// 触达方式数据
const contactMethods09 = ref([])
const contactMethods15 = ref([])
const contactMethods11 = ref([])
const contactMethods16 = ref([])

// 各模块数量数据
const recordNumbers = ref({
	// 基础信息
	gsxx: 0,        // 工商信息
	ggxx: 0,        // 高管信息
	gdxx: 0,        // 股东信息
	nbxx: 0,        // 年报信息
	bgxx: 0,        // 变更信息
	dwtz: 0,        // 对外投资
	fzjg: 0,        // 分支机构
	yskgr: 0,       // 疑似实控人

	// 司法涉诉
	sxxx: 0,        // 失信信息
	cpws: 0,        // 裁判文书
	ktgg: 0,        // 开庭公告
	laxx: 0,        // 立案信息
	fygg: 0,        // 法院公告
	zxxx: 0,        // 执行信息
	gtdj: 0,        // 股权冻结
	xzxl: 0,        // 限制消费令
	zbaj: 0,        // 终本案件

	// 经营风险
	yyyc: 0,        // 经营异常
	xzcf: 0,        // 行政处罚
	hfcf: 0,        // 环保处罚
	ywf: 0,         // 严重违法
	jyzx: 0,        // 简易注销
	qsgg: 0,        // 欠税公告
	sfpm: 0,        // 司法拍卖
	gtcz: 0,        // 股权出质
	zscqcz: 0,      // 知识产权出质
	dcdy: 0,        // 动产抵押
	sswf: 0,        // 税收违法

	// 经营信息
	gys: 0,         // 供应商
	kh: 0,          // 客户
	swpj: 0,        // 税务评级
	ztb: 0,         // 招投标

	// 知识产权
	sb: 0,           // 商标
	zl: 0,           // 专利
	zzzs: 0,         // 资质证书
	rjzzq: 0,        // 软件著作权
	wzba: 0,         // 网站备案
	zzq: 0,          // 著作权

	// 发展历程
	rzjl: 0,         // 融资经历
	cpxx: 0,         // 产品信息
	zqrz: 0          // 债券融资
})

// 弹框相关数据
const showPopup = ref(false)
const popupTitle = ref('')
const popupData = ref([])

// 曾用名弹窗相关数据
const showFormerNameModal = ref(false)
const formerNameList = computed(() => {
	return contactMethods16.value || []
})

// 判断是否有曾用名数据
const hasFormerName = computed(() => {
	console.log('判断曾用名数据，contactMethods16.value:', contactMethods16.value)
	if (!contactMethods16.value || contactMethods16.value.length === 0) {
		console.log('contactMethods16 为空或长度为0')
		return false
	}

	// 检查是否至少有一个有效的曾用名数据
	// 兼容多种可能的字段名
	const hasData = contactMethods16.value.some(item => {
		const name = item.formatName || item.historyName || item.name || item.companyName
		console.log('检查项:', item, 'name字段值:', name)
		return !!name && name.trim() !== ''
	})
	console.log('是否有曾用名数据:', hasData)
	return hasData
})

// 显示曾用名弹窗
const showFormerNamePopup = () => {
	if (hasFormerName.value) {
		showFormerNameModal.value = true
	}
}

// 关闭曾用名弹窗
const closeFormerNameModal = () => {
	showFormerNameModal.value = false
}

// 底部按钮选中状态
const isBottomItemSelected = ref({
	collection: false,  // 收藏 (42.png)
	monitor: false,     // 监控 (43.png)
	checkup: false,     // 体检 (44.png)
	similar: false      // 找相似 (45.png)
})

// 获取底部图标路径
const getBottomIconPath = (baseNumber, key) => {
	if (isBottomItemSelected.value[key]) {
		return `https://apizx01.sc798.com/Resource/details/0${baseNumber}.png`
	}
	return `https://apizx01.sc798.com/Resource/details/${baseNumber}.png`
}

// 导航相关数据
const activeNavIndex = ref(0)
const navigationItems = ref([
	{ title: '基础信息', id: 'basic-info' },
	{ title: '司法涉诉', id: 'legal-risk' },
	{ title: '经营风险', id: 'business-risk' },
	{ title: '经营信息', id: 'business-info' },
	{ title: '知识产权', id: 'intellectual-property' },
	{ title: '发展历程', id: 'development-history' }
])



// 高管信息数据
const executiveInfo = ref([])
// 发送请求获取企业简介
const fetchEnterpriseIntroduction = async (enterprise) => {
	try {
		const requestData = {
			creditcode: enterprise.creditCode,
			companyname: enterprise.companyName
		}

		console.log('发送企业简介请求参数:', requestData)

		// 发送POST请求到 /enterprise/basic/introduction
		const response = await uni.request({
			url: 'https://apizx01.sc798.com/api/proxy/enterprise/basic/introduction',
			method: 'POST',
			data: requestData,
			header: {
				'content-type': 'application/x-www-form-urlencoded'
			}
		})



		// 处理响应数据
		if (response.data.code === 200) {
			// 更新企业简介数据
			introduction.value = response.data.rows[0]?.introduction;
		}
	} catch (error) {
		console.error('获取企业简介失败:', error)
		uni.showToast({
			title: '获取企业简介失败',
			icon: 'none'
		})
	}
}
const gudongInfo = ref([])

// 发送请求获取各模块数量
const fetchRecordNumbers = async (enterprise) => {
	try {
		const requestData = {
			creditcode: enterprise.creditCode,
			companyname: enterprise.companyName
		}

		console.log('发送数量统计请求参数:', requestData)

		// 发送POST请求到 /enterprise/recordnumlist
		const response = await uni.request({
			url: 'https://apizx01.sc798.com/api/proxy/enterprise/recordnumlist',
			method: 'POST',
			data: requestData,
			header: {
				'content-type': 'application/x-www-form-urlencoded'
			}
		})

		console.log('数量统计响应:', response)

		// 处理响应数据
		if (response.data.code === 200) {
			const data = response.data.rows[0] || {}
			console.log('数量统计数据:', data)

			// 更新各模块数量
			recordNumbers.value = {
				// 基础信息
				gsxx: data.person || 0,        // 法人企业主要人员数量
				ggxx: data.person || 0,        // 法人企业主要人员数量
				gdxx: data.shareholder || 0,   // 工商公示股东数量
				nbxx: data.report || 0,        // 企业年报数量
				bgxx: data.change || 0,        // 企业变更记录数量
				dwtz: data.invest || 0,        // 企业对外投资数量
				fzjg: data.branch || 0,        // 分支机构数量
				yskgr: data.person || 0,       // 疑似实控人（使用法人企业主要人员数量）

				// 司法涉诉
				sxxx: data.promise || 0,       // 企业失信数量
				cpws: data.lawsuits || 0,      // 裁判文书数量
				ktgg: data.kaiting || 0,       // 开庭公告数量
				laxx: data.cases || 0,         // 立案数量
				fygg: data.court || 0,         // 法院公告数量
				zxxx: data.executors || 0,     // 企业被执行数量
				gtdj: data.freeze || 0,        // 股权冻结工商公示数量
				xzxl: data.limitConsumer || 0, // 限制高消费数量
				zbaj: data.termination || 0,   // 终本案件数量

				// 经营风险
				yyyc: data.abnormal || 0,      // 经营异常工商公示数量
				xzcf: data.administrative || 0, // 行政处罚数量
				hfcf: data.huanbao || 0,       // 环保处罚数量
				ywf: data.seriousIllegal || 0,  // 严重违法工商公示数量
				jyzx: data.cancellation || 0,  // 简易注销
				qsgg: data.taxOverdue || 0,    // 欠税数量
				sfpm: data.auctions || 0,      // 司法拍卖数量
				gtcz: data.quality || 0,       // 股权出质工商公示数量
				zscqcz: data.knowledge || 0,   // 知识产权出质工商公示数量
				dcdy: data.mortgages || 0,     // 动产抵押工商公示数量
				sswf: data.taxPunish || 0,     // 重大税收违法数量

				// 经营信息
				gys: data.supply || 0,         // 供应商数量
				kh: data.customer || 0,        // 客户数量
				swpj: data.taxLevel || 0,      // 纳税A级数量
				ztb: data.bidding || 0,        // 招投标基本数量

				// 知识产权
				sb: data.trademark || 0,       // 商标数量
				zl: data.patent || 0,          // 专利详细数量
				zzzs: data.certification || 0, // 资质证书数量
				rjzzq: data.softs || 0,        // 软件著作权数量
				wzba: data.website || 0,       // 域名合并数量
				zzq: data.copys || 0,          // 作品著作权数量

				// 发展历程
				rzjl: data.finance || 0,       // 公司融资数量
				cpxx: data.product || 0,       // 公司产品数量
				zqrz: data.finance || 0        // 债券融资（使用公司融资数量）
			}

			console.log('更新后的数量数据:', recordNumbers.value)
		} else {
			console.log('数量统计请求失败:', response.data?.msg)
		}
	} catch (error) {
		console.error('获取数量统计失败:', error)
		uni.showToast({
			title: '获取数量统计失败',
			icon: 'none'
		})
	}
}

// 发送请求获取企业基本信息
const industryNameNew = ref([])
const fetchEnterpriseBasicInfo = async (enterprise, category = '01') => {
	try {
		const requestData = {
			category: category,
			companyname: enterprise.companyName,
			creditcode: enterprise.creditCode,
			pageNum: 1,
			pageSize: 10,
			ishistorycode: ''
		}

		console.log(`发送请求参数 (category: ${category}):`, requestData)
		console.log(`开始发送请求 - category: ${category}`)

		// 发送POST请求到 /enterprise/basic/basic
		const response = await uni.request({
			url: 'https://apizx01.sc798.com/api/proxy/enterprise/basic/basic',
			method: 'POST',
			data: requestData,
			header: {
				'content-type': 'application/x-www-form-urlencoded'
			}
		})

		console.log(`企业信息响应 (category: ${category}):`, response)
		console.log(`响应状态码: ${response.data?.code}`)
		console.log(`响应数据:`, response.data)

		// 处理响应数据
		if (response.data.code === 200) {
			if (category === '01') {
				// 重置 logo 占位符状态
				showLogoPlaceholder.value = false

				// 更新企业基本信息
				companyInfo.value = response.data.rows;
				console.log('企业基本信息:', companyInfo.value)
				console.log('企业Logo URL:', companyInfo.value[0]?.logoUrl)

				// 更新企业简介内容
				updateIntroItems()

				// 获取企业简介
				fetchEnterpriseIntroduction(enterprise)
			} else if (category === '02') {
				// 处理股东信息数据 (category: 02)
				executiveInfo.value = response.data.rows || [];
			} else if (category === '03') {
				// 处理高管信息数据 (category: 03)
				gudongInfo.value = response.data.rows || [];

			} else if (category === '09') {
				// 处理触达方式数据 (category: 09)
				contactMethods09.value = response.data.rows || [];
				console.log('触达方式数据 (09):', contactMethods09.value)
			} else if (category === '15') {
				// 处理触达方式数据 (category: 15)
				contactMethods15.value = response.data.rows || [];
				console.log('触达方式数据 (15):', contactMethods15.value)
			} else if (category === '11') {
				// 处理网站数据 (category: 11)
				contactMethods11.value = response.data.rows || [];
				console.log('网站数据 (11):', contactMethods11.value)
			} else if (category === '16') {
				// 处理 category 16 数据
				contactMethods16.value = response.data.rows || [];
				console.log('Category 16 数据:', contactMethods16.value)
			}
		} else {
			console.log(`响应状态码不是200 (category: ${category}):`, response.data?.code)
			console.log(`响应消息:`, response.data?.msg)
		}
	} catch (error) {
		console.error(`获取企业信息失败 (category: ${category}):`, error)
		uni.showToast({
			title: '获取企业信息失败',
			icon: 'none'
		})
	}
}

// 生命周期
onMounted(() => {
	console.log('企业详情页面已挂载')

	// 获取页面参数
	const pages = getCurrentPages()
	const currentPage = pages[pages.length - 1]
	const options = currentPage.options

	// 检查是否有传递的企业信息
	if (options.enterprise) {
		try {
			const enterprise = JSON.parse(decodeURIComponent(options.enterprise))
			receivedEnterprise.value = enterprise
			console.log('接收到的企业信息:', enterprise)

			// 发送请求获取详细信息
			fetchEnterpriseBasicInfo(enterprise)

			// 获取各模块数量统计
			fetchRecordNumbers(enterprise)

			// 获取股东和高管信息
			fetchEnterpriseBasicInfo(enterprise, '02')
			fetchEnterpriseBasicInfo(enterprise, '03')

			// 获取触达方式数据
			fetchEnterpriseBasicInfo(enterprise, '09')
			fetchEnterpriseBasicInfo(enterprise, '15')
			fetchEnterpriseBasicInfo(enterprise, '11')
			fetchEnterpriseBasicInfo(enterprise, '16')
		} catch (error) {
			console.error('解析企业信息失败:', error)
		}
	}
})
</script>

<style lang="scss" scoped>
.enterprise-detail-page {
	// min-height: 100vh;
	background-color: #ffffff;
	padding-bottom: 132rpx;
}

.company-header {
	display: flex;
	align-items: flex-start;
	padding: 24rpx;
	box-sizing: border-box;
	// margin-top: 210rpx; // 导航栏高度

	.company-logo {
		margin-right: 24rpx;

		.logo-image {
			width: 80rpx;
			height: 80rpx;
			border-radius: 8rpx;
		}

		.logo-placeholder {
			width: 80rpx;
			height: 80rpx;
			background: #296AFD;
			border-radius: 8rpx;
			display: flex;
			align-items: center;
			justify-content: center;

			.logo-text {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 600;
				font-size: 32rpx;
				color: #FFFFFF;
			}
		}
	}

	.company-info {
		flex: 1;

		.company-name {
			font-size: 32rpx;
			font-weight: 600;
			color: #000;
			display: block;
			margin-bottom: 16rpx;
		}

		.company-tags {
			display: flex;
			flex-wrap: wrap;
			gap: 12rpx;

			.tag-item {
				height: 32rpx;
				border-radius: 24rpx;
				padding: 0 16rpx;
				display: flex;
				align-items: center;
				justify-content: center;

				&.status-tag {
					background-color: rgba(34, 197, 94, 0.1);

					.tag-text {
						color: #22c55e;
						font-size: 18rpx;
					}
				}

				&.former-tag {
					background-color: #f5f5f5;

					.tag-text {
						color: #666;
						font-size: 18rpx;
					}
				}

				&.size-tag,
				&.type-tag {
					background-color: rgba(41, 106, 253, 0.1);

					.tag-text {
						color: #296AFD;
						font-size: 18rpx;
					}
				}
			}
		}
	}
}

.metrics-section {
	display: flex;
	padding: 0 24rpx;
	margin-bottom: 20rpx;
	gap: 16rpx;

	.metric-card {
		flex: 1;
		height: 120rpx;
		border-radius: 12rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		position: relative;

		&.credit-card {
			background: linear-gradient(135deg, rgba(41, 106, 253, 0.1) 0%, rgba(41, 106, 253, 0.05) 100%);
		}

		&.value-card {
			background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
		}

		&.investment-card {
			background: linear-gradient(135deg, rgba(255, 87, 87, 0.1) 0%, rgba(255, 87, 87, 0.05) 100%);
		}

		.metric-value {
			font-size: 36rpx;
			font-weight: bold;
			margin-bottom: 8rpx;

			.credit-card & {
				color: #296AFD;
			}

			.value-card & {
				color: #ffc107;
			}

			.investment-card & {
				color: #ff5757;
			}
		}

		.metric-label {
			font-size: 24rpx;
			color: #666;
		}
	}
}

.basic-info-container {
	width: 704rpx;
	height: auto;
	background: #F4F5F7;
	border-radius: 8rpx;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24rpx;
	box-sizing: border-box;

	.info-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		padding: 12rpx 8rpx;
		min-height: 80rpx;

		.info-title {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 20rpx;
			color: #000000;
			white-space: nowrap;
			flex-shrink: 0;
			margin-bottom: 8rpx;
		}

		.info-content {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 600;
			font-size: 24rpx;
			color: #000000;
			text-align: center;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			line-clamp: 2;
			-webkit-box-orient: vertical;
			overflow: hidden;
			text-overflow: ellipsis;
			line-height: 1.2;
			word-break: break-all;
			flex: 1;
		}
	}

	.divider {
		width: 2rpx;
		height: 68rpx;
		background: #000000;
		border-radius: 1rpx;
		opacity: 0.1;
		margin: 0 16rpx;
	}
}

.enterprise-intro {
	margin-top: 22rpx;
	padding-left: 24rpx;

	.intro-item {
		margin-bottom: 10rpx;

		&:last-child {
			margin-bottom: 0;
		}

		.intro-header {
			display: flex;
			align-items: center;
			cursor: pointer;
			max-width: 656rpx;

			.intro-title {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				margin-right: 8rpx;
				flex-shrink: 0;
			}

			.intro-icon {
				width: 22rpx;
				height: 22rpx;
				margin-right: 8rpx;
				flex-shrink: 0;
			}

			.intro-content {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				flex: 1;
				line-height: 1.4;
				display: -webkit-box;
				-webkit-line-clamp: 1;
				line-clamp: 1;
				-webkit-box-orient: vertical;
				overflow: hidden;

				&.expanded {
					display: block;
					-webkit-line-clamp: unset;
					line-clamp: unset;
					overflow: visible;
				}
			}

			.intro-arrow {
				width: 14rpx;
				height: 8rpx;
				background: rgba(51, 51, 51, 0.4);
				clip-path: polygon(50% 100%, 0 0, 100% 0);
				margin-left: 8rpx;
				flex-shrink: 0;
				transition: transform 0.3s ease;

				&.rotated {
					transform: rotate(180deg);
				}
			}
		}
	}
}

.enterprise {
	margin-top: 22rpx;
	width: 704rpx;
	height: auto;
	background: #F4F5F7;
	border-radius: 8rpx;
	margin-left: auto;
	margin-right: auto;

	.enterprise-header {

		height: 58rpx;
		display: flex;
		align-items: center;
		padding-left: 20rpx;
		border-bottom: 1rpx solid #E5E5E5;

		.enterprise-title {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 600;
			font-size: 24rpx;
			color: #000000;
			margin-right: 6rpx;
		}

		.enterprise-icon {
			width: 22rpx;
			height: 22rpx;
		}
	}

	.enterprise-content {
		padding: 20rpx 20rpx 25rpx 20rpx;
		position: relative;

		.enterprise-text {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 24rpx;
			color: #000000;
			line-height: 40rpx;
			display: block;
			word-break: break-all;

			&:not(.expanded) {
				display: -webkit-box;
				-webkit-line-clamp: 3;
				line-clamp: 3;
				-webkit-box-orient: vertical;
				overflow: hidden;
				padding-right: 80rpx;
			}
		}

		.more-btn {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 24rpx;
			color: #296AFD;
			position: absolute;
			right: 20rpx;
			bottom: 25rpx;
			cursor: pointer;
			background: #F4F5F7;
			padding-left: 10rpx;
		}
	}
}

.reach-way {
	margin-top: 20rpx;
	width: 704rpx;
	height: auto;
	background: #F4F5F7;
	border-radius: 8rpx;
	margin-left: auto;
	margin-right: auto;

	.reach-way-header {
		height: 58rpx;
		display: flex;
		align-items: center;
		padding-left: 20rpx;
		border-bottom: 1rpx solid #E5E5E5;

		.reach-way-title {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 600;
			font-size: 24rpx;
			color: #000000;
			margin-right: 6rpx;
		}

		.reach-way-text {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 20rpx;
			color: #000000;
			margin-left: 12rpx;
			margin-top: 10rpx;
		}

		.reach-way-icon {
			width: 22rpx;
			height: 22rpx;
		}
	}

	.reach-way-content {
		padding: 20rpx;
		display: flex;
		flex-direction: column;
		gap: 16rpx;

		.reach-item {
			display: flex;
			align-items: center;
			// justify-content: center;
			text-align: center;

			.reach-title {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				margin-right: 8rpx;
				white-space: nowrap;
			}

			.reach-content {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				margin-right: 8rpx;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;

			}

			.reach-tag {
				width: 46rpx;
				height: 28rpx;
				background: #FD6859;
				border-radius: 12rpx;

				display: flex;
				align-items: center;
				justify-content: center;

				.tag-text {
					font-family: 'Alibaba PuHuiTi', sans-serif;
					font-weight: 400;
					font-size: 20rpx;
					color: #000000;
				}
			}
		}
	}

	.reach-way-contents {
		padding: 20rpx;
		display: flex;
		justify-content: space-around;

		.reach-way-content-item {
			width: 208rpx;
			height: 188rpx;
			background: #FFFFFF;
			border-radius: 8rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			align-items: center;
			padding: 22rpx 0 24rpx 0;
			box-sizing: border-box;

			.content-tit {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 400;
				font-size: 20rpx;
				color: #000000;
			}
		}
	}
}

.shareholder {
	margin-top: 48rpx;
	width: 704rpx;
	height: auto;
	background: #F4F5F7;
	border-radius: 8rpx;
	padding: 24rpx 20rpx 32rpx 20rpx;
	margin-left: auto;
	margin-right: auto;
	display: flex;
	flex-direction: column;
	gap: 16rpx;
	box-sizing: border-box;

	.shareholder-top {
		display: flex;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 16rpx;

		.shareholder-card {
			width: 64rpx;
			height: 144rpx;
			background: #DFE7F6;
			border-radius: 8rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-shrink: 0;

			.shareholder-title {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 500;
				font-size: 24rpx;
				color: #296AFD;
				line-height: 28rpx;
				max-width: 34rpx;
				word-wrap: break-word;
				white-space: normal;
				text-align: center;
			}
		}

		.shareholder-details-container {
			display: flex;
			flex-wrap: nowrap;
			gap: 16rpx;
			overflow-x: auto;
			overflow-y: hidden;
			-webkit-overflow-scrolling: touch;
			scrollbar-width: none;
			-ms-overflow-style: none;

			&::-webkit-scrollbar {
				display: none;
			}
		}

		.shareholder-detail {
			width: 280rpx;
			height: 144rpx;
			background: #FFFFFF;
			border-radius: 8rpx;
			padding: 20rpx;
			display: flex;
			flex-direction: column;
			box-sizing: border-box;
			flex-shrink: 0;

			.detail-top {
				display: flex;
				align-items: flex-start;
				margin-bottom: 12rpx;

				.detail-avatar {
					width: 64rpx;
					height: 64rpx;
					background: #296AFD;
					border-radius: 8rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					margin-right: 12rpx;
					flex-shrink: 0;

					.avatar-text {
						font-family: 'Alibaba PuHuiTi', sans-serif;
						font-weight: 600;
						font-size: 32rpx;
						color: #FFFFFF;
						display: -webkit-box;
						-webkit-line-clamp: 2;
						line-clamp: 2;
						-webkit-box-orient: vertical;
						overflow: hidden;
						text-overflow: ellipsis;
						text-align: center;
						line-height: 1.2;
					}
				}

				.detail-name {
					font-family: 'Alibaba PuHuiTi', sans-serif;
					font-weight: 500;
					font-size: 24rpx;
					color: #000000;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					line-clamp: 2;
					-webkit-box-orient: vertical;
					overflow: hidden;
					text-overflow: ellipsis;
					line-height: 1.2;
					max-height: calc(24rpx * 1.2 * 2);
					word-break: break-all;
				}
			}

			.detail-bottom {
				.detail-content {
					font-family: 'Alibaba PuHuiTi', sans-serif;
					font-weight: 400;
					font-size: 20rpx;
					color: #000000;
					line-height: 1.4;
				}
			}
		}
	}

	.shareholder-bottom {
		display: flex;
		align-items: flex-start;
		margin-top: 16rpx;
		// justify-content: center;
		// gap: 20rpx;

		.executive-card {
			display: flex;
			align-items: flex-start;
			gap: 16rpx;
			width: 100%;
			flex: 1;

			.executive-avatar {
				width: 64rpx;
				height: 120rpx;
				background: #F4EEDD;
				border-radius: 8rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				flex-shrink: 0;

				.executive-title {
					font-family: 'Alibaba PuHuiTi', sans-serif;
					font-weight: 500;
					font-size: 24rpx;
					color: #F7B500;
					line-height: 28rpx;
					max-width: 34rpx;
					word-wrap: break-word;
					white-space: normal;
					text-align: center;
				}
			}

			.executive-details-container {
				display: flex;
				flex-wrap: nowrap;
				gap: 16rpx;
				overflow-x: auto;
				overflow-y: hidden;
				-webkit-overflow-scrolling: touch;
				scrollbar-width: none;
				-ms-overflow-style: none;
				flex: 1;
				min-width: 0;

				&::-webkit-scrollbar {
					display: none;
				}
			}

			.executive-detail {
				width: 280rpx;
				height: 120rpx;
				background: #FFFFFF;
				border-radius: 8rpx;
				padding: 28rpx 0 28rpx 20rpx;
				box-sizing: border-box;
				flex-shrink: 0;

				.executive-info {
					display: flex;
					align-items: center;

					.executive-avatar-small {
						width: 64rpx;
						height: 64rpx;
						background: #FD6859;
						border-radius: 8rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						margin-right: 12rpx;

						.avatar-text-small {
							font-family: 'Alibaba PuHuiTi', sans-serif;
							font-weight: 600;
							font-size: 32rpx;
							color: #FFFFFF;
						}
					}

					.executive-text {
						display: flex;
						flex-direction: column;

						.executive-name {
							font-family: 'Alibaba PuHuiTi', sans-serif;
							font-weight: 500;
							font-size: 20rpx;
							color: #000000;
							margin-bottom: 4rpx;
						}

						.executive-position {
							font-family: 'Alibaba PuHuiTi', sans-serif;
							font-weight: 400;
							font-size: 20rpx;
							color: #000000;
						}
					}
				}
			}
		}
	}
}

.dynamic-section {
	margin-top: 20rpx;
	width: 704rpx;
	height: auto;
	background: #F4F5F7;
	border-radius: 8rpx;
	margin-left: auto;
	margin-right: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20rpx;
	box-sizing: border-box;

	.dynamic-title {
		font-family: 'Alibaba PuHuiTi', sans-serif;
		font-weight: 600;
		font-size: 24rpx;
		color: #000000;
		margin-right: 10rpx;
	}

	.dynamic-divider {
		width: 2rpx;
		height: 28rpx;
		background: #D8D8D8;
		border-radius: 1rpx;
		margin-right: 12rpx;
	}

	.dynamic-content {
		font-family: 'Alibaba PuHuiTi', sans-serif;
		font-weight: 400;
		font-size: 24rpx;
		color: #000000;
		max-width: 478rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		flex: 1;

		&.expanded {
			white-space: normal;
			overflow: visible;
			text-overflow: unset;
		}
	}

	.dynamic-actions {
		display: flex;
		align-items: center;
		margin-left: 38rpx;
		cursor: pointer;

		.expand-text {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 24rpx;
			color: #296AFD;
			margin-right: 8rpx;
		}

		.dynamic-arrow {
			width: 14rpx;
			height: 8rpx;
			background: #296AFD;
			clip-path: polygon(50% 100%, 0 0, 100% 0);
			transition: transform 0.3s ease;

			&.rotated {
				transform: rotate(180deg);
			}
		}
	}
}

.detail-section {
	margin-top: 20rpx;
	width: 704rpx;
	margin-left: auto;
	margin-right: auto;
	background: #F4F5F7;
	border-radius: 8rpx;
	padding-bottom: 1rpx;
	box-sizing: border-box;

	.detail-category {
		margin-bottom: 32rpx;

		.category-title {
			height: 58rpx;
			display: flex;
			align-items: center;
			padding-left: 20rpx;
			border-bottom: 1rpx solid #E5E5E5;
			margin-bottom: 32rpx;

			.title-text {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 600;
				font-size: 24rpx;
				color: #000000;
				margin-right: 14rpx;
			}

			.title-icon {
				width: 22rpx;
				height: 22rpx;
			}
		}

		.category-items {
			display: flex;
			align-items: flex-start;
			justify-content: flex-start;
			flex-wrap: wrap;
			width: 100%;
			box-sizing: border-box;
			padding-left: 20rpx;
			box-sizing: border-box;

			.detail-item {
				width: 166rpx;
				height: 144rpx;
				background: #FFFFFF;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				position: relative;
				cursor: pointer;
				border-right: 2rpx solid #E5E5E5;
				border-bottom: 2rpx solid #E5E5E5;
				box-sizing: border-box;
				flex-shrink: 0;

				&:nth-child(4n) {
					border-right: none;
				}

				&:nth-last-child(-n+4) {
					border-bottom: none;
				}

				&:nth-child(4n+1) {
					border-left: 2rpx solid #E5E5E5;
				}

				&:nth-child(-n+4) {
					border-top: 2rpx solid #E5E5E5;
				}

				.detail-icon {
					width: 40rpx;
					height: 40rpx;
					margin-bottom: 14rpx;
				}

				.detail-title {
					font-family: 'Alibaba PuHuiTi', sans-serif;
					font-weight: 300;
					font-size: 24rpx;
					color: #000000;
					text-align: center;
					line-height: 1.2;
				}

				.badge {
					position: absolute;
					top: 8rpx;
					right: 8rpx;
					width: 46rpx;
					height: 28rpx;
					background: #FEEFEE;
					border-radius: 12rpx;

					display: flex;
					align-items: center;
					justify-content: center;
					color: #FD6859;

				}
			}
		}
	}
}

// 固定底边栏样式
.bottom-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 750rpx;
	height: 112rpx;
	background: #FFFFFF;
	box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
	z-index: 999;

	.bottom-content {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
		padding: 0 42rpx;
		box-sizing: border-box;

		.bottom-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			height: 100%;
			padding: 12rpx 0;
			box-sizing: border-box;
			cursor: pointer;

			&:first-child {
				margin-left: 0;
			}

			&:nth-child(2) {
				margin-left: 50rpx;
			}

			&:nth-child(3) {
				margin-left: 48rpx;
			}

			&:nth-child(4) {
				margin-left: 52rpx;
			}

			.bottom-icon {
				width: 38rpx;
				height: 38rpx;
				margin-bottom: 8rpx;
			}

			.bottom-text {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 400;
				font-size: 22rpx;
				color: #111217;
				text-align: center;
				line-height: 1.2;

				&.add-text {
					color: #296AFD;
				}
			}
		}

		.feedback-btn {
			width: 240rpx;
			height: 84rpx;
			background: #296AFD;
			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
			border-radius: 42rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-left: 52rpx;
			cursor: pointer;

			.feedback-text {
				font-family: 'Alibaba PuHuiTi', sans-serif;
				font-weight: 600;
				font-size: 32rpx;
				color: #FFFFFF;
				text-align: center;
				line-height: 1.2;
			}
		}
	}
}

// 导航区域样式
.navigation-section {
	// margin: 30rpx 0;
	width: 100%;
	height: 83rpx;
	background: #F4F5F7;
	display: flex;
	align-items: center;
}

.navigation-scroll {
	width: 100%;
	height: 100%;
	white-space: nowrap;
}

.navigation-content {
	display: flex;
	align-items: center;
	padding-left: 27rpx;
	height: 100%;
}

.nav-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-right: 40rpx;
	height: 100%;
	cursor: pointer;

	&:last-child {
		margin-right: 27rpx;
		padding-right: 27rpx;
	}

	.nav-text {
		font-family: 'Alibaba PuHuiTi', sans-serif;
		font-weight: 400;
		font-size: 30rpx;
		color: #000000;
		white-space: nowrap;
		transition: color 0.3s ease;
	}

	&.active {
		.nav-text {
			color: #296AFD;
		}
	}

	.nav-indicator {
		position: absolute;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
		width: 100%;
		height: 4rpx;
		background: #296AFD;
		border-radius: 2rpx;
	}
}

// 弹框样式
.popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.popup-content {
	width: 600rpx;
	max-height: 80vh;
	background: #FFFFFF;
	border-radius: 16rpx;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.popup-header {
	height: 80rpx;
	background: #FFFFFF;
	border-bottom: 1rpx solid #E5E5E5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24rpx;

	.popup-title {
		font-family: 'Alibaba PuHuiTi', sans-serif;
		font-weight: 600;
		font-size: 32rpx;
		color: #000000;
		text-align: center;
		flex: 1;
	}

	.popup-close {
		width: 48rpx;
		height: 48rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;

		.close-text {
			font-size: 40rpx;
			color: #999999;
			line-height: 1;
		}
	}
}

.popup-body {
	flex: 1;
	overflow-y: auto;
	padding: 24rpx;
	max-height: 60vh;
}

.popup-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24rpx 0;
	border-bottom: 1rpx solid #F0F0F0;

	&:last-child {
		border-bottom: none;
	}

	.item-content {
		flex: 1;
		display: flex;
		flex-direction: column;
		margin-right: 16rpx;

		.item-value {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 600;
			font-size: 32rpx;
			color: #000000;
			line-height: 1.4;
			margin-bottom: 8rpx;
			word-break: break-all;
		}

		.item-name {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 24rpx;
			color: #666666;
			line-height: 1.3;
		}
	}

	.copy-btn {
		width: 80rpx;
		height: 48rpx;
		background: #FD6859;
		border-radius: 24rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		cursor: pointer;
		align-self: flex-start;
		margin-top: 4rpx;

		.copy-text {
			font-family: 'Alibaba PuHuiTi', sans-serif;
			font-weight: 400;
			font-size: 20rpx;
			color: #FFFFFF;
		}
	}
}

// 曾用名弹窗样式
.former-name-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.former-name-modal {
	width: 585rpx;
	height: auto;
	background: #FFFFFF;
	border-radius: 20rpx;
	display: flex;
	flex-direction: column;
}

.former-name-header {
	width: 100%;
	height: 114rpx;
	position: relative;
	overflow: hidden;

	.header-bg {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 0;
	}

	.header-content {
		position: relative;
		z-index: 1;
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 47rpx 30rpx 35rpx 43rpx;
		box-sizing: border-box;
	}

	.former-name-title {
		font-weight: 400;
		font-size: 30rpx;
		color: #FFFFFF;
	}

	.former-name-close {
		display: flex;
		align-items: center;
		gap: 8rpx;

		.close-icon {
			width: 27rpx;
			height: 27rpx;
		}

		.close-text-white {
			font-weight: 400;
			font-size: 22rpx;
			color: #FFFFFF;
		}
	}
}

.former-name-body {
	padding: 36rpx 36rpx 40rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16rpx;

	.former-name-item {
		width: 513rpx;
		height: auto;
		background: #F4F5FE;
		border-radius: 10rpx;
		border: 1px solid #E8E9EA;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 28rpx 15rpx 25rpx 43rpx;
		box-sizing: border-box;

		.former-name-item-name {
			font-weight: 400;
			font-size: 28rpx;
			color: #000000;
			margin-bottom: 15rpx;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			line-clamp: 2;
			-webkit-box-orient: vertical;
			word-break: break-word;
			line-height: 1.4;
		}

		.former-name-item-date {
			font-weight: 400;
			font-size: 20rpx;
			color: #000000;
		}
	}
}
</style>
